package cn.s02;

import cn.s02.ignore.Admin;
import cn.s02.ignore.Person;
import cn.s02.ignore.UserAware;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class BeanFactoryTest {
	public static void main(String[] args) {
		XmlBeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("myBeans.xml"));
//		MyTestBean bean = (MyTestBean) beanFactory.getBean("myTestBean");
//		System.out.println(bean.getStr());

		beanFactory.ignoreDependencyInterface(UserAware.class);
		beanFactory.ignoreDependencyType(Admin.class);
		Person person = beanFactory.getBean(Person.class);
		System.out.println(person);
	}
}
